package com.okhttpdemo.http;

import android.content.Context;

import com.okhttpdemo.bean.MyResponse;

import java.io.IOException;

import okhttp3.Call;
import okhttp3.Response;

/**
 * Created by 黄海 on 2017/3/1.
 */

public interface ICallBase<T> {
    void onStart();

    void onResponse(Call call, MyResponse<T> response) throws IOException;

    void onFailure(Context context, Call call, Exception e);

    void onComplete();

    void onProgress(long sended, long totalLength);

    T parseResponse(Response response) throws ParseResponseException, IOException;
}
